html,
body {
  width: 100%;
  height: 100%;
}

body {
  -moz-osx-font-smoothing: grayscale;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-family: Microsoft YaHei, Helvetica Neue, Helvetica, PingFang SC, Hiragino Sans GB, Arial, sans-serif;
  font-size: 14px;
  color: #606266;
  overflow-y: hidden;
}

#app {
  height: 100%;
}

// v-cloak
[v-cloak] {
  display: none;
}

// 主题相关变量
:root {
  --color-primary: '';
}

// 进度条颜色
#nprogress .bar {
  background: #ffffff !important;
}

// Loading 样式
.custom-loading {
  .el-loading-spinner {
    i {
      margin-bottom: 10px;
      color: #fff;
      font-size: 24px;
    }

    .el-loading-text {
      color: #fff;
    }
  }
}

//两行省略号
.ellipsis--two-line {
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  text-overflow: ellipsis;
}

//单行省略号
.ellipsis {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

// 隐藏元素
.hidden {
  display: none;
}

// 滚动条样式
.scroll-bar {
  &::-webkit-scrollbar {
    width: 10px;
    height: 10px;
    background-color: transparent;
  }
  &::-webkit-scrollbar-track {
    background-color: transparent;
  }
  &::-webkit-scrollbar-thumb {
    border-radius: 5px;
    background-color: #c4c6cc;
  }
}

// 通用阴影样式
.sc-box-shadow {
  box-shadow: 0 2px 6px 0 rgb(0 0 0 / 8%);
}

// 文字颜色
// 黄色
.sc-color-primary {
  color: var(--color-primary);
}

.sc-color-yellow {
  color: #ffb039;
}

.sc-color-gray {
  color: #909399;
}

.sc-color-red {
  color: #f56c6c;
}

// 宽度
.sc-width-percent-100 {
  width: 100%;
}

// 表格样式处理
.table-box {
  position: relative;
  flex: 1;
  padding-top: 20px;

  .el-table {
    position: absolute;
    width: 100%;
    padding: 0 20px;
    overflow: auto;

    ::v-deep .el-table__cell {
      padding: 8px 0 !important;
    }

    &::before {
      background-color: transparent;
    }

    ::v-deep .el-table__body-wrapper {
      &::-webkit-scrollbar {
        width: 10px;
        height: 10px;
        background-color: transparent;
      }
      &::-webkit-scrollbar-track {
        background-color: transparent;
      }
      &::-webkit-scrollbar-thumb {
        border-radius: 5px;
        background-color: #c4c6cc;
      }
    }
  }
}

// 权限配置
.menu-wrapper {
  .menu-type-box {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    height: 38px;
    padding: 0 14px;

    .menu-type {
      display: flex;
      align-items: center;
      user-select: none;

      .sc-icon {
        font-size: 20px;

        &.transform {
          transform: rotate(-90deg);
        }
      }

      span {
        margin-left: 4px;
      }

      &:hover {
        cursor: pointer;
      }
    }

    .add-icon {
      :hover {
        cursor: pointer;
        color: var(--color-primary);
      }
    }
  }

  .menu-box {
    width: 100%;

    li {
      display: flex;
      justify-content: space-between;
      align-items: center;
      width: 100%;
      height: 38px;
      padding: 0 15px 0 38px;
      cursor: default;

      &:hover {
        background-color: #f2f2f2;

        .operate-box {
          display: unset;
        }
      }

      &.active {
        background-color: #ebf1ff;
      }

      .menu-list {
        display: flex;
        align-items: center;

        .sc-icon {
          margin-right: 6px;
          font-size: 16px;
        }
      }

      .operate-box {
        display: none;

        .sc-icon {
          margin-left: 10px;

          &:hover {
            color: var(--color-primary);
            cursor: pointer;
          }
        }
      }
    }
  }
}
